package st.business.tepth.business.taskallocation.returnfactory;

import io.reactivex.disposables.Disposable;
import st.business.tepth.base.OnDataConvertListener;
import st.business.tepth.business.bean.ReturnFactoryBean;
import st.shadow.library.core.base.mvp.BaseModel;
import st.shadow.library.core.base.mvp.BasePresenter;
import st.shadow.library.core.base.mvp.BaseView;

/**
 * Author: shadow
 * Email:  1025431817@qq.com
 * Time:   2019-09-02 18:13
 */

public interface ReturnFactoryContract {
    interface View extends BaseView {
        void showData(ReturnFactoryBean data);

        void returnSucceed();

        void showError(String msg);
    }

    interface Model extends BaseModel {
        Disposable getData(String token, int repairId,
                           OnDataConvertListener<ReturnFactoryBean> listener);

        Disposable returnFactory(String token, int repairId,
                                 String phenomenonIds, String maintenanceIds,
                                 int rescueFlag, OnDataConvertListener<String>
                                         listener);
    }

    abstract class Presenter extends BasePresenter<View> {
        abstract void getData(String token, int repairId);

        abstract void returnFactory(String token, int repairId,
                                    String phenomenonIds, String maintenanceIds,
                                    int rescueFlag);
    }
}
